package com.ruoyi.project.system.set.service.impl;

import java.util.List;

import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.system.set.mapper.FactorOpSymbolSetMapper;
import com.ruoyi.project.system.set.domain.FactorOpSymbolSet;
import com.ruoyi.project.system.set.service.IFactorOpSymbolSetService;
import com.ruoyi.common.utils.text.Convert;

/**
 * 运算符Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-12-29
 */
@Service
public class FactorOpSymbolSetServiceImpl implements IFactorOpSymbolSetService 
{
    @Autowired
    private FactorOpSymbolSetMapper factorOpSymbolSetMapper;

    /**
     * 查询运算符
     * 
     * @param symbolCd 运算符主键
     * @return 运算符
     */
    @Override
    public FactorOpSymbolSet selectFactorOpSymbolSetBySymbolCd(String symbolCd)
    {
        return factorOpSymbolSetMapper.selectFactorOpSymbolSetBySymbolCd(symbolCd);
    }

    /**
     * 查询运算符列表
     * 
     * @param factorOpSymbolSet 运算符
     * @return 运算符
     */
    @Override
    public List<FactorOpSymbolSet> selectFactorOpSymbolSetList(FactorOpSymbolSet factorOpSymbolSet)
    {
        return factorOpSymbolSetMapper.selectFactorOpSymbolSetList(factorOpSymbolSet);
    }

    /**
     * 新增运算符
     * 
     * @param factorOpSymbolSet 运算符
     * @return 结果
     */
    @Override
    public int insertFactorOpSymbolSet(FactorOpSymbolSet factorOpSymbolSet)
    {
        factorOpSymbolSet.setCreateTm(DateUtils.getNowDate());
        return factorOpSymbolSetMapper.insertFactorOpSymbolSet(factorOpSymbolSet);
    }

    /**
     * 修改运算符
     * 
     * @param factorOpSymbolSet 运算符
     * @return 结果
     */
    @Override
    public int updateFactorOpSymbolSet(FactorOpSymbolSet factorOpSymbolSet)
    {

        return factorOpSymbolSetMapper.updateFactorOpSymbolSet(factorOpSymbolSet);
    }

    /**
     * 批量删除运算符
     * 
     * @param symbolCds 需要删除的运算符主键
     * @return 结果
     */
    @Override
    public int deleteFactorOpSymbolSetBySymbolCds(String symbolCds)
    {
        return factorOpSymbolSetMapper.deleteFactorOpSymbolSetBySymbolCds(Convert.toStrArray(symbolCds));
    }

    /**
     * 删除运算符信息
     * 
     * @param symbolCd 运算符主键
     * @return 结果
     */
    @Override
    public int deleteFactorOpSymbolSetBySymbolCd(String symbolCd)
    {
        return factorOpSymbolSetMapper.deleteFactorOpSymbolSetBySymbolCd(symbolCd);
    }
}
